<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>核销</title>  
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/base.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/detail.css" />
</head>
<body>
<div class="detail">
	<div class="prolist" onclick="window.location.href='__MODULE__/Exchange/index/gid/{$goods.id}'">
		<div class="pro">
			<div class="pic"><img src="__PUBLIC__/Wx/images/pic13.jpg"/></div>
			<div class="name">
				<h2><b class="md"><?=$goods['u_id']>0?'门店':'品牌';?></b>{$goods.title} {$goods.u_num}<?=getunit($goods['unit'])?></h2>
				<!--<h1>钻石|白金会员专享</h1>-->
				<h1 style="color:#666;">市场参考价：{$goods.price}元</h1>
				<h3 style="height:20px;"><em style="font-size:14px;">
					<neq name="order['money']" value="0"><?=$order['money'].'元';?></neq>
					<if condition="($order['money'] gt 0) AND ($order['level_integral'] gt 0)">+</if>
					<neq name="order['level_integral']" value="0"><?=$order['level_integral'].'积分';?></neq>
				</em><!--<i>（钻石专享）</i>--><b>X1</b></h3>
			</div>
		</div>
	</div>
    <!--<div class="button"><input type="button" value="立即核销" onclick="window.location.href='__MODULE__/Receive/cancel/oid/{$id}/'"/></div>-->
    <div class="button"><input type="button" onclick="do_send()" <in name="order['state']" value="2,3">style="background:#dddddd;" value="已核销" disabled <else />value="立即核销"</in> /></div>
</div>
<!--引用悬浮公共导航文件-->
<include file="Public:nav" />
<script type="text/javascript" src="__PUBLIC__/Wx/js/jquery-1.9.1.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script type="text/javascript">

    $(".click span").click(function(){
        if($(this).text() ==="导航"){
            $(this).text("收起");
            $('.link02').css('display','block')
        }else{
            $(this).text("导航");
            $('.link02').css('display','none')
        }//end if
    });//end fun


    function do_send(){
        var oid = {$order['id']};
        var money = {$order['money']};
        var credit1 = {$order['level_integral']};
        $.post("__MODULE__/ExchangeReceive/receive",{'oid':oid,'money':money,'credit1':credit1},function (d) {
            // console.log(d);return;
            // location.reload();
            if (d.state > 0){
                layer.msg(d.val, {icon:1,time:3000});
			}else{
                $(".button input").val('已核销');
                $(".button input").attr("disabled","disabled");
                $(".button input").css("background","#dddddd");
                layer.msg(d.val, {icon:1,time:3000},
                    function(){
                        window.location.href= d.url;
                    });
			}//end if

        });//end fun

    }//end fun
</script>
</body>
</html>